﻿using System;

namespace CharpClassGen
{
    class Program
    {
        static void Main(string[] args)
        {
            //测试生成类
            CsharpClassGenerator generator = new CsharpClassGenerator("Player", "MonoBehaviour","TestNameSpace");
            generator.AddUserdNameSpace("System");
            generator.AddField(new Field("int", "age"));
            generator.AddProperty(new Property("string", "name"));
            generator.AddMethod(new Method("void", "SayName")).AddArgument(new Argument("int", "a"))
                    .AddCodeBlock("Console.WriteLine(this.name);");
            Console.WriteLine(generator.ToString());
        }
    }
}
